@import "variables";

@mixin button-style($active-color) {
  &:active:not(.md-button) {
    background-color: darken($active-color, 10%);
    &.button-clear {
      background-color: transparent;
      color: darken($active-color, 10%);
    }
  }
}
// 添加蚕宝宝button,button-green是绿色的按钮，也可以改变其他颜色
.button-green {
  @include button-style($green);
}
// button按钮的样式(在引入button的时候，外面要嵌套一个div来决定button的宽度)
// button-block是设置宽度的，加上这个让button占一行
.button-size{
  min-height: 45px;
}
.button{
  border-radius:4px;
  font-size:16px;
  line-height:45px;
  padding: 0 12px;
  min-width: 52px;
  .button-block{
    width:100%;
  }
}
//云麦button自定义的颜色#50d2c2(绿色背景的按钮，可以设置字体大小，颜色)
.button.button-green{
  border-color:transparent;
  background-color:$green;
  color:$order-status-text-color;
}
.button.button-green:hover{
  color:$order-status-text-color;
  text-decoration:none;
}
//.button.button-green.active,.button.button-green.activated{
//  border-color:#a2a2a2;
//  background-color:$green;
//}
//button的大小，small，normal(与普通button一样)，large三个尺寸
.button-small {
  padding: 2px 4px 1px;
  min-width: 28px;
  min-height: 30px!important;
  font-size: 12px;
  line-height: 26px;
}
.button-large {
  padding: 0 16px;
  min-width: 68px;
  min-height: 60px!important;
  font-size: 20px;
  line-height: 53px;
}
//只带边框的按钮
.button-outline{
  border-color: $green!important;
  background: transparent!important;
  color: $green!important;
}








.button-positive {
  @include button-style($positive);
}

.button-balanced {
  @include button-style($balanced);
}

.button-energized {
  @include button-style($energized);
}

.button-calm {
  @include button-style($calm);
}

.button-royal {
  @include button-style($royal);
}

.button-light {
  @include button-style($light);
}

.button-dark {
  @include button-style($dark);
}

.button-stable {
  @include button-style($stable);
}

.button-outline {
  &:active {
    color: #FFF !important;
  }
}

// Fab Button
.button-fab {
  min-width: 44px !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 1px 0 0 0;
}

// MdButton
.md-button {
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
  -webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}

.md-ripple {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(#FFF, 0.4);
  min-width: 20px;
  min-height: 20px;
  opacity: 0;
}

.md-ripple-effect {
  animation: ripple 2s;
  -webkit-animation: ripple 2s;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(20);
    opacity: 0;
  }
}

@-webkit-keyframes ripple {
  0% {
    -webkit-transform: scale(1);
    opacity: 0.4;
  }
  100% {
    -webkit-transform: scale(20);
    opacity: 0;
  }
}
